html,
body,
#app {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}
p {
  margin: 0;
  padding: 0;
}

.reader-chapter {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #000;
  font-size: 0;
  position: relative;
  height: 100%;

  &__item {
    position: relative;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    text-align: center;
    vertical-align: center;
    max-width: 100%;
    margin: 0 auto;

    .chapter-img {
      position: relative;
      z-index: 1;
      opacity: 0;
      transition: 0.3s;
      transform-origin: center center;
    }

    .loading,
    .loading-tip {
      display: flex;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      align-items: center;
      justify-content: center;
    }

    .loading {
      width: 16px;
      height: 16px;
      display: none;
    }

    .loading-tip {
      width: 100%;
      height: 100%;
      color: gray;
      font-size: 40px;
      // z-index: 2;
    }

    .tip-error-msg {
      width: 100%;
      color: #999;
      font-size: 16px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      line-height: 1.5;
      transition: .3s;
      opacity: 0;
    }

    .tip-error-btn {
      margin-top: 10px;
      display: inline-block;
      padding: 0 8px;
      height: 24px;
      background-color: #d46459;
      color: #fff;
      font-size: 14px;
      line-height: 24px;
      border-radius: 4px;
    }

  }
}

.reader-static {
  position: absolute;
  z-index: 99;
  left: 0;
  bottom: 0;
  height: 16px;
  min-width: 1rem;
  padding: 2px 5px;
  border-top-right-radius: 10px;
  font-size: 12px;
  line-height: 16px;
  color: #fff;
  background-color: rgba(0, 0, 0, .6);
}

.reader-no-copyright {
  padding: 60px 16px 0;
  font-size: 14px;
  line-height: 1.5;
  color: gray;
  text-align: center;
  transform: translateY(50%);

  .icon {
    display: block;
    width: 120px;
    margin: 0 auto 12px;
  }

  .url-back {
    display: inline-block;
    height: 28px;
    width: 100px;
    border-radius: 14px;
    margin: 12px auto 0;
    font-size: 14px;
    line-height: 28px;
    text-align: center;
    color: white;
    background-color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
  }
}

.reader-menu {
  display: flex;
  position: fixed;
  z-index: 99;
  left: 0;
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  align-items: center;
  font-size: 12px;
  background-color: rgba(40, 40, 40, 0.95);
  transition: opacity 300ms ease, visibility 300ms ease, transform 300ms ease;
  color: gray;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  transition: 0.3s;

  a {
    color: white;
    text-decoration: none;
  }

  .flex {
    flex: 1;
  }

  [class*="ift-"] {
    font-size: 0;
    ::before {
      display: inline-block;
      height: 44px;
      width: 44px;
      line-height: 44px;
      text-align: center;
      font-size: 16px;
    }
  }

  &-title {
    flex: 1;
    display: block;
    color: white;
    font-size: 12px;
  }

  .hidden {
    opacity: 0;
    visibility: hidden;
  }

  &.top {
    top: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);

    &.hidden {
      transform: translate3d(0, -100%, 0);
    }
  }


  &.bottom {
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.25);

    &.hidden {
      transform: translate3d(0, 100%, 0);
    }
  }
}
